Creating templates for HTML publishing

During the publish process, Flash inserts the Publish Settings parameters in a template you select in the HTML panel. A template is a text file that includes special variables beginning with a dollar sign ($). (Use \$ if you need to use a $ for another purpose in the document.) Flash substitutes the appropriate value for each template variable. A template can be any text file containing the appropriate template variables.

Flash does not change anything in a template except for the template variables in a template, so a template can include any HTML content for your application, or even code for special interpreters such as Cold Fusion, ASP, and the like.

Flash saves the modified template using the file name of the Flash movie with the extension of the template. For example, if you select a template named Standard.asp for use with a Flash movie named MyMovie.swf, the resulting file would be named MyMovie.asp.

A template does not have to include all of the template variables. Flash simply does not insert values for any missing variable and the default values remain.

When no template has been selected in the Publish Settings dialog box, Flash uses a template named Default.html.þIf Default.html is not present, Flash uses the first template on the list.

Flash stores templates in the Flash application folder in a folder named HTML.

Flash templates have the following characteristics:

A one-line title which appears on the Template pop-up menu.
A longer description which appears when you click the Info button.
Template variables beginning with $ which specify where parameter values should be substituted when Flash generates the output file.

The following tables lists all the template variables Flash recognizes. For a definition of all the tags these variables work with, see About Flash HTML requirements.
Parameter Template Variable

Template title

$TT

Template description start

$DS

Template description finish

$DF

Width

$WI

Height

$HE

Movie

$MO

HTML alignment

$HA

Looping

$LO

Parameters for OBJECT

$PO

Parameters for EMBED

$PE

Play

$PL

Quality

$QU

Scale

$SC

Salign

$SA

Wmode

$WM

Devicefont

$DE

Bgcolor

$BG

Movie text (spot to write movie text)

$MT

Movie URL (location of movie URLs)

$MU

Image width (unspecified image type)

$IW

Image height (unspecified image type)

$IH

Image file name (unspecified image type)

$IS

Image map name

$IU

Image map tag location

$IM

QuickTime width

$QW

QuickTime height

$QH

QuickTime file name

$QN

GIF width

$GW

GIF height

$GH

GIF file name

$GS

JPEG width

$JW

JPEG height

$JH

JPEG file name

$JN

PNG width

$PW

PNG height

$PH

PNG file name

$PN

Generator variables OBJECT tag

$GV

Generator variables EMBED tag

$GE